DNS在线查询工具 您所在的位置:网站首页 ip查询网站 国外网站 DNS在线查询工具

DNS在线查询工具

2024-02-19 14:07| 来源: 网络整理| 查看: 265

关于DNS在线查询工具:

这个在线DNS查询工具从Linux服务器返回DNS查询结果.您可以选择DNS查询类型(默认类型A),并查询任何五个公共DNS服务器(默认谷歌公共DNS服务器). 支持DNS类型:

DNS类型 简介 A 指定域名对应的IPv4地址 AAAA 指定域名对应的IPv6地址 CNAME 别名记录 MX 邮件交换记录 NS 指定该域名由哪个DNS服务器来进行解析 TXT 主机名或域名的说明 SOA 起始授权机构 PTR 反向IP查询 ANY 所有DNS记录类型 DNS查询需不需要加www.前缀?

在大多数情况下,带有或不带www前缀的DNS查询都可以正常返回结果, 但是没有www前缀的DNS查询通常会返回有关域名的更多信息, 这是因为有www前缀的域名是二级域名.

为什么需要使用DNS查询?

当您想在线查看facebook时,您可能无法记住facebook网站的IP地址"31.13.67.35",而是在浏览器中输入"facebook.com". 域名对于人而言更容易记住,但对于机器而言,机器更喜欢通过IP地址与其他机器通信. 您在浏览器中点击进入Facebook,您的浏览器会自动执行DNS查询并获取IP地址"31.13.67.35".

DNS查询将域名转换为机器可理解的IP地址. 但DNS查询的功能不限于此,但NsLookup可以找到域名的邮件服务器,域名的IPv6地址等等.

DNS查询也用于专业领域. 在证明域名拥权的过程中,添加TEXT类型的DNS记录可以证明您的域名所有权(如果您从Godaddy购买域名,则可以在Godaddy的DNS服务器中设置DNS记录).

使用Cloudflare隐藏您的网站真实DNS记录:

Cloudflare可以通过其CDN(全球内容分发网络)转发您网站的流量,在DNS查询结果中使用Cloudflare的IP替换您的Web服务器的真实IP地址. 可以将将您域名的DNS服务器指向Cloudflare的DNS服务器.

您应该使用哪个DNS服务器?

DNS服务器的权限对于Internet的安全性至关重要. 错误的DNS结果可能会导致您进入错误的网站. 世界各地共有13个根服务器. 与此同时,谷歌等大公司提供免费的公共DNS服务(8.8.8.8)供日常使用.

默认情况下,如果您未在计算机中设置默认DNS服务器,则您的ISP(Internet服务提供商)将为您指定DNS服务器,尽管它可能不如Google的公共DNS服务(8.8.8.8)可靠. DNS服务器很容易设置,你应将计算机的默认DNS服务器更改为其中一个公共DNS服务器.

更多关于DNS查询的链接:

维基百科 (DNS): https://en.wikipedia.org/wiki/Domain_Name_System

RFC 1035 (DNS): https://www.ietf.org/rfc/rfc1035.txt

Linux系统中的DNS查询: https://linux.die.net/man/1/nslookup

Windows系统中的DNS查询: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/nslookup

Linux系统中的DNS查询命令(nslookup): NAME nslookup - query Internet name servers interactively SYNOPSIS nslookup [-option] [name | -] [server] root@instance-2:/var/log/apache2# nslookup -type=any facebook.com 8.8.8.8 Server: 8.8.8.8 Address: 8.8.8.8#53 Non-authoritative answer: facebook.com nameserver = a.ns.facebook.com. facebook.com nameserver = b.ns.facebook.com. facebook.com text = "v=spf1 redirect=_spf.facebook.com" facebook.com mail exchanger = 10 msgin.vvv.facebook.com. facebook.com origin = a.ns.facebook.com mail addr = dns.facebook.com serial = 1530053366 refresh = 14400 retry = 1800 expire = 604800 minimum = 300 Name: facebook.com Address: 2a03:2880:f12c:183:face:b00c:0:25de Name: facebook.com Address: 157.240.14.35 Authoritative answers can be found from: 用Python进行DNS查询 (用 package dnspython): # pip install dnspython import dns.resolver def nslookup(domain, record_type): dns_resolver = dns.resolver.Resolver() answers = dns_resolver.query(domain, record_type) for answer in answers: print('Domain:{0} Record Type:{1} Answer:{2}'.format(domain, record_type, answer)) if __name__ == "__main__": # dns lookup domain nslookup('coding.tools', 'A') ------------------- Domain:coding.tools Record Type:A Answer:104.27.176.94 Domain:coding.tools Record Type:A Answer:104.27.177.94 用Java进行DNS查询 (用 package java.net.InetAddress): import java.io.IOException; import java.net.InetAddress; public class DNS { public static void nslookup(String domain) throws IOException { InetAddress[] remote_hosts = InetAddress.getAllByName(domain); for (InetAddress remote_host : remote_hosts) { System.out.println("Domain:" + domain + " IP Address:" + remote_host.getHostAddress()); } } public static void main(String[] args) throws IOException { // dns lookup domain nslookup("coding.tools"); } } ------------------- Domain:coding.tools IP Address:104.27.176.94 Domain:coding.tools IP Address:104.27.177.94


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有